package com.tanhua.manager;

import com.tanhua.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/manage")
public class messageController {

    @Autowired
    private MessageService messageService;

    @PostMapping(name = "动态通过",value = "/messages/pass")
    public String pass(@RequestBody String[] id){
        return messageService.pass(id);
    }

    @PostMapping(name = "动态拒绝",value = "/messages/reject")
    public String reject(@RequestBody String[] id){
        return messageService.reject(id);
    }
}
